//
//  CImageView.swift
//  CViews
//
//  Created by 任超华 on 2021/11/18.
//

import UIKit

class CImageView: UIImageView {

    /*
    // Only override draw() if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func draw(_ rect: CGRect) {
        // Drawing code
    }
    */

}

public extension UIImageView {
    func setNetImage(_ url:String, placeHolder: String? = nil) {
        self.kf.setImage(with: URL(string: url), placeholder: UIImage(named: placeHolder ?? ""))
    }
}
